from pyecharts import options as opts
from pyecharts.charts import Radar
from pyecharts.globals import ThemeType
radar=Radar(init_opts=opts.InitOpts(
    width='600px', height ='400px',
    theme = ThemeType.ESSOS, page_title ='雷达图'))
radar.add(series_name='某员工',data=[[90, 60, 75, 85, 95]],
linestyle_opts=opts.LineStyleOpts(color='red'))
radar.add_schema(
    schema=[
        opts.RadarIndicatorItem(name='管理能力', max_=100),
        opts.RadarIndicatorItem(name='业务能力', max_=100),
        opts.RadarIndicatorItem(name='组织能力', max_=100),
        opts.RadarIndicatorItem(name='沟通能力', max_=100),
        opts.RadarIndicatorItem(name='表达能力', max_=100),],
    center=['50%','60%'],
        splitline_opt=opts.SplitLineOpts(is_show=True,
                                         linestyle_opts=opts.LineStyleOpts(color='grey')),
    textstyle_opts=opts.TextStyleOpts(color='black'))
radar.set_global_opts(title_opts=opts.TitleOpts(title='某员工能力分析雷达图',pos_left='center'),
                      legend_opts=opts.LegendOpts(pos_right='35',pos_left='25'))
radar.render('例3-5.html')
